package cn.edu.zut.qixiang.service;

import cn.edu.zut.qixiang.mapper.WeatherDailyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 86178
 */
@Service
public class WeatherDailyServiceImpl implements WeatherDailyService {

    @Autowired
    private WeatherDailyMapper weatherDailyMapper;
    @Override
    public Map<String, Integer> countHighTemperature() {
        Map<String, Integer> result = new HashMap<>();
        result.put("highTempCount", weatherDailyMapper.countHighTemperature());
        return result;
    }
    @Override
    public Map<String, Integer> countWeatherTypes() {
        Map<String, Integer> result = new HashMap<>();
        result.put("type8Count", weatherDailyMapper.countByWeatherType8());
        result.put("type9Count", weatherDailyMapper.countByWeatherType9());
        return result;
    }

}
